$(function(){
    $('#sexform').change(function(){
        $('#sex').val($('#sexform').val())
    })
})
function getBirthDayAdd(form)
{
	if(document.getElementById('zzzl').value=="zzzl1")
        { 
    	     if(document.getElementById('zzhm').value.length==15||document.getElementById('zzhm').value.length==18)
             {
			if(document.getElementById('zzhm').value.length==15)
			{
				var str = document.getElementById('zzhm').value;
								
							
				//��ȡ�Ա�:ż��ΪŮ
				var getSexNum=str.substring(14,15);
				if(getSexNum%2==0)
				{
					document.getElementById('sexform').value="0";
				}
				else
				{
					document.getElementById('sexform').value="1";
				}
						
			}
			if(document.getElementById('zzhm').value.length==18)
			{
				var str = document.getElementById('zzhm').value;
								
							
				//��ȡ�Ա�:ż��ΪŮ
				var getSexNum=str.substring(16,17);
				if(getSexNum%2==0)
				{
					document.getElementById('sexform').value="0";
				}
				else
				{
					document.getElementById('sexform').value="1";
				}
			}
			document.getElementById('sex').value = document.getElementById('sexform').value;
              }
              else
     	      { 
         	    ;
	      }
        }
}



	   
	

//��֤�����ѡ�����֤ʱ���Ա��û֣�����ѡ
function sexdefault(form)
{	
	if ( document.getElementById('zzzl').value == "zzzl1" )
	{
		document.getElementById('sexform').disabled  = true ;
		document.getElementById('sex').value = document.getElementById('sexform').value;
		
		//��Sex�ؼ�disabled�������ڱ���ҳ���ȡ��������ֵ������һ�ؼ�������ҳ���Sexcopy�ؼ���ȡֵ
	}
	else
	{
		document.getElementById('sexform').disabled  = false ;
		document.getElementById('sex').value = document.getElementById('sexform').value;
	}
}